package com.cloud.wyf.Mapper;

import com.cloud.wyf.Entity.Part;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PartMapper {

    @Select("select * from part where part=#{part}")
    Part selectByPart(String part);

    @Select("select * from part where directparty=#{directPart}")
    List<Part> selectByDirectPart(String directPart);

    @Select("select * from part")
    List<Part> selectAll();

    @Select("SELECT SUM(num) FROM part")
    int totalNum();
}
